<template>
   <div id="cxUpload" class="cx-upload">
     <button id="pickfiles" class="uploadBtn">上传</button> 
  </div>
</template>

<script>


  import * as qiniu from 'qiniu-js'
    
  export default {

    data(){
      return {
        
      }
    },
    methods: {
      upLoadQiniu() { // 加载七牛
      
        this.initQiniu();
          
      },
      initQiniu() { // 初始化七牛
        let file = '';//文件名
        let key = 'test1';
        let token = '';
        let putExtra={
          fname: "",
          params: {},
          mimeType: [] || null
        };
        let config ={
          useCdnDomain: true,
        };
        const observable = qiniu.upload(file, key, token, putExtra, config)
        let self = this;
      
      }
    },
    mounted() {
        this.upLoadQiniu();
    }
  }
</script>

<style scoped>
    .cx-upload {
        display: inline-block;
        
    }
    .uploadBtn {
            width: 64px;
            height: 30px;
            color: #2f363c;
            outline: none;
            border: 2px solid #2f363c;
        }
    @media screen and (max-width:648px) {
        .cx-upload {
            float: left;
        }
    }
</style>